#ifndef _STRAWGUI_RESOURCE_PRESET_H_
#define _STRAWGUI_RESOURCE_PRESET_H_

#include "sNamedObject.h"
#include "DataBase.h"
#include "sConfig.h"

namespace sgui
{
namespace res
{
	class sResource;
};
namespace engine
{
	class sEngineItem;
	class sEngine;
};
namespace preset
{

    class sPreset : public sNamedObject
    {
	private:
		const res::sResource&		m_resource;
		engine::sEngineItem*		m_engineItem;
    public:
        sPreset(sGUI&gui, const std::wstring& name, const res::sResource& resource);

		const res::sResource&			getResource() const;
        virtual engine::sEngineItem*	createEngineItem(engine::sEngine& engine) = 0;

		engine::sEngineItem* getEngineItem();
		const engine::sEngineItem* getEngineItem() const;

		void init(engine::sEngine& engine);
		void load(const db::Record &file);
		void save(db::Record &file) const;
        void clear();

#ifdef _EDITOR
	    void exportRTTI(rtti::sInfoList& list);
#endif
        virtual const std::wstring getClass() const = 0;
    };

};
};

#endif